n = 8                                  # 购买篮球的个数
price = 24                             # 每个篮球的单价
money = 200                            # 原来的金额
total = price * n                      # 要支付金额
back = money - total                   # 要找回的金额
print(f'{total}$ \n {back}$')          # 打印要支付的金额和找回的金额